<!--
 * @Author: your name
 * @Date: 2022-02-18 09:46:38
 * @LastEditTime: 2022-02-25 18:05:39
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /CMS/src/views/cms/check-management/checkData-management/originalData-query/components/A2cModalCopy.vue
-->
<template>
  <div class="h-flex" style="height: 100%;">
    <div
      ref="tree_box_right"
      class="app-container__right h-flex-elastic v-flex overflow-hidden">
      <div class="work-info">
        <span>文件包：{{ responseData.packageName }}，检测时间：{{ showDate(responseData.detectDate) }}</span>
      </div>
      <div class="v-flex-elastic detailContent h-flex">
        <div class="h-flex-elastic v-flex">
          <second-c-detail
            :detect-job-id="detectJobId"
            @showTitle="showTitle" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import SecondCDetail from './A2cImage'
import { parseTime } from '@/utils'
export default {
  name: 'SecondC',
  components: {
    SecondCDetail
  },
  props: {
    detectJobId: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      responseData: {}
    }
  },
  created() {
    // this.query()
  },
  methods: {
    showTitle(data) {
      this.responseData = data
    },
    showDate(value) {
      return parseTime(value, '{y}-{m}-{d}')
      // var dayjsValue = dayjs(value)
      // if (dayjsValue.isValid()) {
      //   return dayjsValue.format('YYYY-MM-DD')
      // } else {
      //   return ''
      // }
    }
  }
}
</script>
<style lang="scss" scoped>
.work-info{
  padding: 15px 10px;
  color: black;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
</style>
